package model;
/**
 * Grants a player a get of of jail card.
 * @author Group 20.
 */
public class GetOutOfJail extends Card
{

	/**
	 * Constructor
	 * @param description: Description of the card.
	 */
	public GetOutOfJail(String description) {
		super(description);
	}

	/**
	 * Grant the player a get out of jail card when the card is drawn.
	 */
	@Override
	public boolean draw(Player player) 
	{
		player.receiveJailCard();
		return true;
	}

	@Override
	public String toString() {
		return "GetOutOfJail ["+super.toString() +	"]";
	}

	/**
	 * This card does not effect on any payment
	 */
	@Override
	public int getPayment() {
		return 0;
	}
}
